<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>My Stores</title>
        <script type="text/javascript" src="<?php echo base_url(); ?>js/jquery.js"></script>
        <script type="text/javascript" src="<?php echo base_url(); ?>js/get_my_stores.js"></script>
        <LINK REL=StyleSheet HREF="<?php echo base_url().'/css/mockup.css';?>"/>
    </head>
    <body>
        <h1>My Stores</h1>
        <?php if (isset($status)) { if ($status === 'error') { ?>
                <span style="color: red"><?php echo $message ?></span>
            <?php }} ?>
                
                
                <h2><a href="<?php echo site_url().'/client_controller/store_reg';?>">Register a Store</a></h2>
                
        <table style="border:1px inset;">
            <tr>
                <th>
                    Name
                </th>
                <th>
                    Motto
                </th>
                <th>
                    Phone
                </th>
                <th>
                    Schedule
                </th>
                <th>
                    District
                </th>
                <th colspan="3">
                    Address
                </th>
                <th></th>
                <th></th>
                
                
                
            </tr>
            <?php
            foreach ($data as $store) {
                echo "
            <tr class='store_row' rel='" . $store->id . "'>
                <td>
                   " . $store->name . " 
                <td>
                   " . $store->motto . " 
                </td>
                <td>
                   " . $store->primary_telephone . " 
                </td>
                <td>
                   " . $store->schedule . " 
                </td>
                <td>
                   " . $store->district . " 
                </td>
                <td colspan='3'>
                   " . $store->address_line_1 . '  ' . $store->address_line_2 . " 
                </td>
               
                <td>
                    <a href='". site_url() . '/client_controller/get_products_from_store/' . $store->id ."'>Products</a>
                </td>
                <td>
                    <a href='". site_url() . '/client_controller/store_del/' . $store->id ."'>Del</a>
                </td>
            </tr>";
            }
            ?>
        </table>
        <h2><a href="<?php echo site_url().'/client_controller/dashboard';?>">To Dashboard...</a></h2>
    </body>
</html>
